<?php
require_once 'loader.php';
require_once 'Mobitv/Cronjobs/Reporting.php';
$reporting = new Mobitv_Cronjobs_Reporting();

$today = date('Y-m-d');
$yesterday = date('Y-m-d', strtotime($today) - 60*60*24);

//$reporting->setDate('2010-03-04');
//$reporting->updateDaily();die;

for($d=strtotime($yesterday); $d<=strtotime($today); $d+=60*60*24)
{
    $date = date('Y-m-d', $d);
    $reporting->setDate($date);
    $reporting->updateDaily();
}

echo "UPDATE REPORTING ON " . date("Y-m-d H:i:s") . "\n";
